<include file="Public/header" />
<body onselectstart="return false">
<div class="main FromUpToDown" >
    <div class="content" style="position: relative">
        <div class="head-content">
            <div class="head-title">
                <span>修改公告</span>
            </div>
        </div>
        <form action='' id="form" >
            <div class="form-content">
           
           
                <div class="form">
                    <div class="form-left">公告内容</div>
                    <div class="form-right">
                        <textarea  name="content" cols="80" rows="20"><{$info['content']}></textarea>
                    </div>
                </div>

                <input type='hidden' name='id' value="<{$info['id']}>" >
                <div class="form-operate">
                    <button type='button' id="save"  class="form-button color-bg-green">保存</button>
                </div>
            </div>
        </form>
    </div>
</div>
<include file="Public/footer"  />
<script>
    $("#save").click(function(){
		if($("textarea[name='content']").val() == ''){
            layer.tips('请输入公告内容！', 'textarea[name="content"]', {tips: [2, 'red'], time: 1000});
            return;
        }
        $("#save").attr('disabled',true);
        $.post(
                "<{:U('save')}>",
                $("#form").serialize(),
                function(res){
                    if(res.status == 1){
                        layer.tips(res.info, '#save', {tips: [2, 'green'], time: 1000});
                        setTimeout("location.reload()",1000);
                    }
                }
        );
    });
</script>
</body>
</html>